package com.app.brilliant.system.entity;
import com.baomidou.mybatisplus.annotation.TableId;
import com.app.brilliant.common.entity.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotBlank;
import java.util.Date;


@Data
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "定时任务对象", description = "定时任务")
public class ScheduleJob extends BaseEntity {
    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键")
    @TableId
    private Long jobId;

    @ApiModelProperty(value = "部门名称")
    @NotBlank(message = "部门名称不能为空")
    private String name;

    @ApiModelProperty(value = "spring bean名称")
    @NotBlank(message = "spring bean名称不能为空")
    private String beanName;

    @ApiModelProperty(value = "参数")
    @NotBlank(message = "参数不能为空")
    private String params;

    @ApiModelProperty(value = "方法名称")
    @NotBlank(message = "方法名称不能为空")
    private String methodName;

    @ApiModelProperty(value = "表达式")
    @NotBlank(message = "表达式不能为空")
    private String cronExpression;

    @ApiModelProperty(value = "备注信息")
    @NotBlank(message = "备注信息不能为空")
    private String remark;

    @ApiModelProperty(value = "创建时间")
    @NotBlank(message = "创建时间不能为空")
    private Date createTime;

    @ApiModelProperty(value = "状态")
    @NotBlank(message = "状态不能为空")
    private Byte status;
}
